package cn.com.api.mapper.base;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.*;

import cn.com.api.entity.ApiU_user_friend_group;

//DAO
public interface U_user_friend_groupMapperBase {

	// 根据id查看
	@Select("SELECT * FROM U_USER_FRIEND_GROUP  WHERE ID = #{id}")
	public ApiU_user_friend_group findU_user_friend_groupById(Integer id);

	// 查看数据集
	@Select("SELECT * FROM U_user_friend_group")
	public List<ApiU_user_friend_group> findU_user_friend_groups();

	// 根据条件查看数据集
	public List<Map<String, Object>> findU_user_friend_groupsByMap(HashMap condition);

	// 添加
	@Insert("INSERT INTO U_USER_FRIEND_GROUP (GROUP_NAME, REMARK, ADD_TIME, CREATE_ID, SORT) VALUES (#{group_name}, #{remark}, #{add_time}, #{create_id}, #{sort})")
	@Options(useGeneratedKeys = true, keyProperty = "id")
	public int insertU_user_friend_group(ApiU_user_friend_group u_user_friend_group);

	// 修改
	@Update("UPDATE U_USER_FRIEND_GROUP SET GROUP_NAME = #{group_name}, REMARK = #{remark}, ADD_TIME = #{add_time}, CREATE_ID = #{create_id}, SORT = #{sort} WHERE ID = #{id}")
	public int updateU_user_friend_group(ApiU_user_friend_group u_user_friend_group);

	// 删除
	@Delete("DELETE FROM U_USER_FRIEND_GROUP  WHERE ID = #{id}")
	public int deleteU_user_friend_group(Integer id);

	// Foreign keys revelant

	// region Indexs revelant

}
